package net.yla.smartbus.module.ba.vehicle.service.impl;

import net.yla.smartbus.module.ba.vehicle.entity.BaVehicleDriverRlDo;
import net.yla.smartbus.module.ba.vehicle.mapper.VehicleStaffRelevanceMapper;
import net.yla.smartbus.module.ba.vehicle.query.VehicleStaffRelevanceQuery;
import net.yla.smartbus.module.ba.vehicle.service.VehicleStaffRelevanceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author 默苍离
 * @date 2021/7/10 10:54
 * <p>
 * ******************************************
 * @annotation:
 */
@Service
public class VehicleStaffRelevanceServiceImpl implements VehicleStaffRelevanceService {


    @Autowired
    private VehicleStaffRelevanceMapper vehicleStaffRelevanceMapper;


    /**
     * 获取 人员 车辆 关联表中数据
     *
     * @param query
     * @return
     */
    @Override
    public List<BaVehicleDriverRlDo> getData(VehicleStaffRelevanceQuery query) {
        List<BaVehicleDriverRlDo> data = vehicleStaffRelevanceMapper.getData(query);
        return data;
    }


    /**
     * 新增数据
     *
     * @param baVehicleDriverRlDo
     * @return
     */
    @Override
    public Integer insert(BaVehicleDriverRlDo baVehicleDriverRlDo) {
        Integer insert = vehicleStaffRelevanceMapper.insert(baVehicleDriverRlDo);
        return insert;
    }


}
